//app.js
App({
  onLaunch: function () {
    const Verify = require('/verify_mpsdk/main');
    Verify.init();
  },

  getLogin(){
    return new Promise(function (resolve,reject){
      wx.login({
        success:(res)=>{
          wx.request({
            url: 'https://retire.wshoto.com/wx/login',
            data: { code: res.code },
            success:(res)=>{
              console.log(res)
              resolve(res.data.access_token)
              wx.setStorageSync('access_token', res.data.access_token)
            }
          })
        }
      })
    })
  },

  globalData: {
    userInfo: null
  }
})